

export const getTableColumns = ({ params }) => [
	{
		title: "车辆编号",
		dataIndex: "id",
		width: 140,
		ellipsis: true
	},
	{
		title: "车牌号",
		dataIndex: "plateNo",
		width: 140,
		ellipsis: true
	},
	{
		title: "供应商",
		dataIndex: "supplier",
		width: 140,
		ellipsis: true
	},
	{
		title: "VIN码",
		dataIndex: "vin",
		width: 140,
		ellipsis: true
	},
	{
		title: "车辆状态",
		dataIndex: "status",
		width: 100,
		ellipsis: true,
	},
	{
		title: "后续任务数",
		dataIndex: "waitTaskCounts",
		width: 100,
		ellipsis: true,
	},
	{
		title: "备注",
		dataIndex: "remark",
		width: 140,
		ellipsis: true
	},
];

export const USER_STATUS = [
	{ label: '在线', value: 1 },
	{ label: '离线', value: 2 }
]

export const CAR_TYPE_LIST = [
	{ label: '车辆类型1', value: 1 },
	{ label: '车辆类型2', value: 2 }
]

export const getSearchColumns = () => [
	{
		type: "input",
		placeholder: "车辆编号",
		name: "id"
	},
	{
		type: "select",
		placeholder: "车牌号",
		name: "plateNo"
	},
	{
		type: "input",
		placeholder: "供应商",
		name: "supplier"
	},
	{
		type: "select",
		placeholder: "车辆状态",
		name: "status",
		options: USER_STATUS
	},
]


export const getCreateColumns = ({iconData}: any) => {
	return [
		{
			type: "input",
			placeholder: "车牌号",
			label: "车牌号",
			name: "plateNo",
			rules: [{ required: true, message: '这是必填项' }]
		},
		{
			type: "input",
			placeholder: "供应商",
			label: "供应商",
			name: "supplier",
			rules: [
				{ required: true, message: '这是必填项' },
			]
		},
		{
			type: "input",
			placeholder: "vin码",
			label: "vin码",
			name: "vin",
			rules: [
				{ required: true, message: '这是必填项' },
			]
		},
		{
			type: "select",
			placeholder: "车辆图标",
			label: "车辆图标",
			name: "icon",
			options: iconData?.data || []
		},
		{
			type: "input",
			placeholder: "备注",
			label: "备注",
			name: "remark",
		},
	]
}
